e15882e0197878c99fc27f3f099c70c771bc6152,src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java,WebServiceSampler,sample,#,442
Before Change
// soap will return a descriptive error
// message, soap errors within the response
// are preferred.
RESULT.setResponseCode("200");
RESULT.setResponseHeaders(this.convertSoapHeaders(st.getHeaders()));
RESULT.setSampleLabel(this.getUrl().toString());
br.close();
After Change
// check to see if SOAPTransport is not nul and receive is
// also not null. hopefully this will improve the error
// reporting. 5/13/05 peter lin
if (st != null && st.receive() != null){
br = st.receive();
if (this.getPropertyAsBoolean(READ_RESPONSE))
{
StringBuffer buf = new StringBuffer();
String line;
while ((line = br.readLine()) != null)
{
buf.append(line);
}
RESULT.sampleEnd();
// set the response
RESULT.setResponseData(buf.toString().getBytes());
}
else
{
// by not reading the response
// for real, it improves the
// performance on slow clients
br.read();
RESULT.sampleEnd();
RESULT.setResponseData(
JMeterUtils
.getResString("read_response_message")
.getBytes());
}
RESULT.setSuccessful(true);
RESULT.setResponseCode("200");
RESULT.setResponseHeaders(this.convertSoapHeaders(st.getHeaders()));
} else {
RESULT.setSuccessful(false);
RESULT.setResponseData(
st.getResponseSOAPContext().getContentType().getBytes());
RESULT.setResponseCode("000");
RESULT.setResponseHeaders("error");
}
// 1-22-04 updated the sampler so that when read